Display the Product Title along the Shop Name where it come from the network
Using the WooCommerce Global Cart all shops in the network can share the same cart, products from different sites can be added and checked-out in a single process. To make cart content more descriptive and clearer to the customers, a shop name can be append to each product title, to indicate the location where the product come from. Also, other necessary information can append, if apply.
The following bit of code appends the origin Shop name, to each product title as the above image show:
add_filter('woocommerce_cart_item_name', 'woocommerce_cart_item_name', 10, 3); function woocommerce_cart_item_name( $product_name, $cart_item, $cart_item_key) { if( ! isset($cart_item['blog_id']) || $cart_item['blog_id'] == '') return $product_name; $site_data = get_blog_details( $cart_item['blog_id'] ); if(isset($site_data->blogname) && $site_data->blogname != '') $product_name .= ' - (' . $site_data->blogname . ')'; return $product_name; }
Hello, it’s possible do this in the orders from customer area?
Hello,
Yes, that will work fine.
Thanks